import request from '@/utils/request'

export default {

    //获取签到列表
    search(searchMap) {
        return request({
            url: `/signin/getListByUserId`,
            method: 'post',
            data: searchMap
        })
    },
    // 添加签到
    add(pojo) {
        return request({
            url: '/signin',
            method: 'post',
            data: pojo
        })
    },

    // 通过ID查询用户信息
    getById(id) {
        return request({
            url: `/signin/${id}`,
            method: 'get'
        })
    },
    // 更新数据
    update(pojo) {
        return request({
            url: `/signin/${pojo.id}`,
            method: 'put',
            data: pojo
        })
    },

    //删除用户
    deleteById(id) {
        return request({
            url: `/signin/${id}`,
            method: 'delete'
        })
    },
		// 获取部门
		getDepartment(){
				return request({
				    url: '/dept',
				    method: 'get'
				})
		}
}